package com.link2room.rodimus.feign.rodimus;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.rodimus.dto.param.base.ExpressBaseDto;
import com.link2room.rodimus.dto.param.inside.ExpressNewInsideParamDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author sqj88
 * @date 2017/11/10 20:24
 */
@FeignClient("${spring.gateway.name}/${feign.rodimus}")
public interface ExpressFeignService {
    /**
     * 新建快递信息
     * @param paramDto
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST, value = "/in/Express",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<ExpressBaseDto> newExpress(@RequestBody ExpressNewInsideParamDto paramDto)throws Exception;

    /**
     * 查询快递信息
     * @param paramMap
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET, value = "/in/Express",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<ExpressBaseDto> findExpress(@RequestParam Map<String, Object> paramMap)throws Exception;
}
